import request from '@/service/request'

export const getCategoryList = () => {
  return request({
    url: '/category/list',
    method: 'GET'
  })
}

export const delCategory = (id: string) => {
  return request({
    url: '/category/' + id,
    method: 'DELETE'
  })
}

export const addCategory = (data: any) => {
  return request({
    url: '/category',
    method: 'POST',
    data
  })
}

export const addPhoto = (data: any) => {
  return request({
    url: '/photo',
    method: 'POST',
    data
  })
}

export const getPhotoPage = (params) => {
  return request({
    url: '/photo/page',
    method: 'GET',
    params
  })
}

export const delPhoto = (id) => {
  return request({
    url: '/photo/' + id,
    method: 'DELETE'
  })
}
